<template>
    <div class="table-header">
        <!-- <table width="800px" border="1" cellspacing ='0' > -->
            <th>
                <input type="checkbox" v-model="$store.state.checkAll" @change="selectAll($store.state.checkAll)">全选
            </th>
            <th>ID</th>
            <th>name</th>
            <th>image</th>
            <th>price</th>
            <th>num</th>
            <th>actions</th>
        <!-- </table> -->
    </div>
</template>
<script>
import {computed,ref,reactive,toRefs} from 'vue'
import {useStore} from 'vuex'
import {useRouter} from 'vue-router'
export default {
    setup(props) {
        const {commit} = useStore()
        const selectAll=(all)=>{
            commit('selectAll',all)
        }
        return {selectAll}
    }
}
</script>
<style lang="scss" scoped>
table{
    th{
        width:100px;
       
    }
}
</style>


